// https://www.cnblogs.com/rubylouvre/archive/2009/09/18/1568794.html

String.prototype.trim = function () {
    return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}